import { reqmemberlist } from '../../http/api'
const state = {
    member_Arr: []
}

const getters = {
    member_Arr(state) {
        return state.member_Arr
    },
}

const mutations = {
    set_memberArr(state, data) {
        state.member_Arr = data
    }
}

const actions = {
    set_memberArr(context, data) {
        reqmemberlist(data).then(res => {
            if (res.data.code === 200) {
                context.commit('set_memberArr', res.data.list)
            }
        }).catch((err) => {
            console.log('请求失败-----err:' + err);
        })
    },
}

export default {
    state,
    getters,
    mutations,
    actions,
    //命名空间
    namespaced: true
}